<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<img id="img" alt="" src="" width="400" height="400">
	<br/>
	<h1>参数path为目录，如：aa/bb，非必填</h1>
	<input id="fileupload" type="file" name="file" multiple
	    data-url="fileUpload/upload"
	    data-sequential-uploads="true"
	    data-form-data='{"path": "wudang/zhangsanfeng"}'>
	<button onclick="func_remove()">remove</button>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-file-upload/9.21.0/js/vendor/jquery.ui.widget.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-file-upload/9.21.0/js/jquery.fileupload.min.js"></script>
<script type="text/javascript">
var filePath = "";

$(function(){
	$('#fileupload').fileupload({
		done: function(e,d){
			filePath = d.result;
			alert(filePath);
			$("#img").attr("src",d.result);
		}
	});
});

function func_remove(){
	if(filePath != ""){
		$.post("fileUpload/remove",{filePath:filePath},function(data){
			alert("是否删除？"+data);
			filePath = "";
		});
	}else{
		alert("已被删除");
	}
}
</script>
</html>